Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/non user namespace #11

Merged
merged 3 commits into from
Nov 8, 2019

Conversation

kusakusakusa
Copy link
Contributor

Hi,

I have a use case where I have multiple users (admin_users and project_managers) so I cannot save the drafts under the user namespace. This PR will allow developers to save draft with a non user model.

The gist of this pull request:

  1. make 'user' a polymorphic association, so a new user_type column of string data type will be added to the drafts table while user_id is still preserved to prevent breaking previous versions
  2. generate a new migration file to add the user_type column
  3. generator spec test

USAGE
Developers on current version can just run the migration commands again to generate the second migration file.

$ rails g drafting:migration
$ rake db:migrate

TODO
if all is good, will add the migration guide to readme

@coveralls
Copy link

coveralls commented Oct 26, 2019

Coverage Status

Coverage decreased (-1.0%) to 99.029% when pulling 59636a2 on Vic-L:feat/non_user_namespace into b6e49db on ledermann:master.

Copy link
Owner

@ledermann ledermann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work, looks good to me!

@kusakusakusa
Copy link
Contributor Author

Thanks!

Before I work on the readme, can I check if this should be a new major or minor version?

@ledermann
Copy link
Owner

I think this PR should be released as 0.5.0 (minor update).

@kusakusakusa
Copy link
Contributor Author

Hi @ledermann, would you be releasing this version anytime soon?

@ledermann ledermann merged commit 6977f97 into ledermann:master Nov 8, 2019
@kusakusakusa kusakusakusa deleted the feat/non_user_namespace branch November 9, 2019 02:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants